package com.daocheng.dc.book.auth.controller;

import com.daocheng.dc.book.auth.model.vo.verificationcode.SendVerificationCodeReqVO;
import com.daocheng.dc.book.auth.service.VerificationCodeService;
import com.daocheng.framework.biz.operationlog.aspect.ApiOperationLog;
import com.daocheng.framework.common.response.Response;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName VerificationCodeController
 * @author: 稻城
 * @date: 2025/3/17
 * @Version 1.0
 * @description: TODO
 */
@RestController
@Slf4j
public class VerificationCodeController {
    @Resource
    private VerificationCodeService verificationCodeService;

    @PostMapping("/verification/code/send")
    @ApiOperationLog(description = "发送验证码")
    public Response<?> send(@RequestBody @Validated SendVerificationCodeReqVO sendVerificationCodeReqVO) {
        return verificationCodeService.send(sendVerificationCodeReqVO);
    }
}
